MSWordExportBase: fix export of header/footer in case of multiple columns

Regression from 263938c4a8789d881f8e736d317b6bcc09c3bce5 (fdo#73596
[DOCX] Multiple Columns in Index, 2014-02-13), header / footer was lost
in multi-column section. This fixes both DOC and DOCX export.

Change-Id: Icb30ec882b38853e25289299d8f829a5cf56e6d8
diff --git a/sw/qa/extras/ooxmlexport/data/2col-header.docx b/sw/qa/extras/ooxmlexport/data/2col-header.docx
new file mode 100644
index 0000000..3e8f2c4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2col-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a1bf053..910fe13 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3745,6 +3745,13 @@
                "/word/embeddings/oleObject1.doc");
}

DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
{
    // Header was lost on export when the document had multiple columns.
    uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
    CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9f2af01..68e2799 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2733,10 +2733,15 @@
    const SfxPoolItem* pI;
    if( pSet)
    {
        bool bNoPageBreak = true;
        bool bNoPageBreak = false;
        if ( SFX_ITEM_ON != pSet->GetItemState(RES_PAGEDESC, true, &pI)
            || 0 == ((SwFmtPageDesc*)pI)->GetPageDesc() )
        {
            bNoPageBreak = true;
        }

        if (bNoPageBreak)
        {
            if (SFX_ITEM_ON != pSet->GetItemState(RES_BREAK, true, &pI))
                bNoPageBreak = true;
            else